home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / babel.xml < prev    next >
Text File  |  2002-08-30  |  4KB  |  95 lines

  1. <search function="babel">
  2.   <name>Babel Fish Language Translation</name>
  3.   <description>
  4.     Use the Babel Fish to translate text or webpages from one language to another.<br/>
  5.       <a class="helpboxDescLabels">Switches:</a><br />
  6.       <table class="helpboxDescTable">
  7.           <tr><td>/from:en</td><td>/to:zh</td><td> - </td><td>English to Chinese</td></tr>
  8.           <tr><td>/from:en</td><td>/to:fr</td><td> - </td><td>English to French</td></tr>
  9.           <tr><td>/from:en</td><td>/to:de</td><td> - </td><td>English to German</td></tr>
  10.           <tr><td>/from:en</td><td>/to:it</td><td> - </td><td>English to Italian</td></tr>
  11.           <tr><td>/from:en</td><td>/to:ja</td><td> - </td><td>English to Japanese</td></tr>
  12.           <tr><td>/from:en</td><td>/to:ko</td><td> - </td><td>English to Korean</td></tr>
  13.           <tr><td>/from:en</td><td>/to:pt</td><td> - </td><td>English to Portuguese</td></tr>
  14.           <tr><td>/from:en</td><td>/to:es</td><td> - </td><td>English to Spanish</td></tr>
  15.           <tr><td>/from:zh</td><td>/to:en</td><td> - </td><td>Chinese to English</td></tr>
  16.           <tr><td>/from:fr</td><td>/to:en</td><td> - </td><td>French to English</td></tr>
  17.           <tr><td>/from:fr</td><td>/to:de</td><td> - </td><td>French to German</td></tr>
  18.           <tr><td>/from:de</td><td>/to:en</td><td> - </td><td>German to English</td></tr>
  19.           <tr><td>/from:de</td><td>/to:fr</td><td> - </td><td>German to French</td></tr>
  20.           <tr><td>/from:it</td><td>/to:en</td><td> - </td><td>Italian to English</td></tr>
  21.           <tr><td>/from:ja</td><td>/to:en</td><td> - </td><td>Japanese to English</td></tr>
  22.           <tr><td>/from:ko</td><td>/to:en</td><td> - </td><td>Korean to English</td></tr>
  23.           <tr><td>/from:pt</td><td>/to:en</td><td> - </td><td>Portuguese to English</td></tr>
  24.           <tr><td>/from:ru</td><td>/to:en</td><td> - </td><td>Russian to English</td></tr>
  25.           <tr><td>/from:es</td><td>/to:en</td><td> - </td><td>Spanish to English</td></tr>
  26.       </table>
  27.     <div class="helpboxDescLabels">Examples:</div>
  28.     <table class="helpboxDescTable">
  29.           <tr><td>babel /from:en /to:es hello how are you</td></tr>
  30.       <tr><td>babel /from:en /to:es http://www.whitehouse.gov</td></tr>
  31.       </table>
  32.   </description>
  33.   <category>Reference</category>
  34.   <link>http://babelfish.altavista.com</link>
  35.   <contributor>Neel Doshi, Greg Mitchell</contributor>
  36.   
  37.   <form name="babelf"
  38.         action="http://babelfish.altavista.com/tr"
  39.         method="post">
  40.     <input type="hidden" name="doit" value="done" />
  41.     <input type="hidden" name="lp" />
  42.     <input type="hidden" name="tt" />
  43.     <input type="hidden" name="urltext" />
  44.     <input type="hidden" name="url" />
  45.   </form>
  46.   
  47.   <script><![CDATA[
  48.     function babel(q)
  49.     {
  50.       if( nullArgs("babel", q) )
  51.         return false;
  52.       else
  53.       {
  54.         var func_name = "babel";
  55.         var switch_list = new Array("from", "to");
  56.         var switch_vals = new Array();
  57.         var args = parseArgs(q, switch_list);
  58.     
  59.         // check if the required switches are set
  60.         for (var j = 0; j < switch_list.length; j++)
  61.         {
  62.           if ( typeof args.switch_val[ switch_list[j] ] == "undefined" || args.switch_val[ switch_list[j] ] == "" )
  63.           {
  64.             alert(func_name + ":  /" + switch_list[j] + " switch must be entered.  Type '" + func_name + " ?' to see instructions");
  65.             return false;
  66.           }
  67.         }
  68.     
  69.         // Determine if the string is a url or not
  70.         var strURL = isURL(args.q);
  71.         if (strURL)
  72.         {
  73.           babelf.tt.value = "url";
  74.           babelf.url.value = strURL;
  75.         }
  76.         else
  77.         {
  78.           babelf.tt.value = "urltext";
  79.           babelf.urltext.value = args.q;
  80.         }
  81.     
  82.         babelf.lp.value =  args.switch_val["from"] + "_" +  args.switch_val["to"];
  83.         submitForm(babelf);
  84.         return true;
  85.       }
  86.     }
  87.   ]]></script>
  88.  
  89.   <copyright>
  90.     Copyright (c) 2002 David Bau
  91.     Distributed under the terms of the
  92.     GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  93.   </copyright>
  94. </search>
  95.